home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
001-025
/
scopedisk19
/
blinker
/
scanline.sub
< prev
next >
Wrap
Text File
|
1995-03-18
|
984b
|
43 lines
'---------------------------------------------------------------------------
'
' Scan Line
'
'
' Copyright 1987 by Brian Zupke
'
'
' Scans source line for 'CALL X.SUB' where X is a
' module name. If found, then the module name is
' returned in ModuleCall$.
'
SUB ScanLine.SUB(SourceLine$,ModuleCall$) STATIC
ModuleCall$ = ""
ThisLine$ = " " + SourceLine$
'
' Skip comments
'
CALL CommentCheck.SUB(ThisLine$,LineIsComment)
IF NOT LineIsComment THEN
'
' Locate ' CALL '
'
C = INSTR(UCASE$(ThisLine$)," CALL ")
IF C > 0 THEN
'
' Isolate subprogram name
'
Character = C + 6
WHILE MID$(ThisLine$,Character,1) = " "
Character = Character + 1
WEND
C = Character
C = INSTR(C,UCASE$(ThisLine$),".SUB")
IF C > 0 THEN
Length = (C + 4) - Character
ModuleCall$ = MID$(ThisLine$,Character,Length)
END IF
END IF
END IF
END SUB